#include <iostream>
#include<cstring>
#include <cmath>
using namespace std;

class Person
{
private:
  char name[20];
  int age;
  char sex;

public:
  Person()
  {
    strcpy(name, "XXX");
    age = 0;
    sex = 'm';
  };
  
  void Register(char *n, int a, char s)
  {
    strcpy(name, n);
    age = a;
    sex = s;
  }

  void showme()
  {
    cout << name << age << sex;
  }

  ~Person(){cout << "Now destroying the instance of Person"};
};

int main()
{

  Person *p1, *p2;
  Person *p1 = new Person;
  Person *p2 = new Person;

  p1->showme();
  p2->showme();

  char name, sex;
  int age;
  cin >> name >> age >> sex;
  p1->Register(name, age, sex);

  delete p1, p2;
  return 0;
}
